WPF and Silverlight Edition Basic Library > FilePicker > FilePicker Quick Start > Step 1 of 3: Creating an Application |
Complete the following steps:
New Project Dialog Box
- WPF: C1.WPF.4.dll
- Silverlight: C1.Silverlight.5.dll
XAML Copy Code <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions>
XAML Copy Code <c1:C1FilePicker x:Name="C1FilePicker1" Grid.Row="0" Margin="15" Height="30" SelectedFilesChanged="C1FilePicker_SelectedFilesChanged" />The markup above gives the control a name, specifies the grid row the control appears in, sets the height of the control and the margin around the control, and indicates an event handler for the SelectedFilesChanged event. You'll add the event handler code in a later step.
XAML |
Copy Code
|
---|---|
<ScrollViewer Grid.Row="1" Margin="15,0,15,0"> <ListBox x:Name="ListBox" /> </ScrollViewer> <StackPanel Grid.Row="2" Name="stackPanel1" Orientation="Horizontal" HorizontalAlignment="Center"> <Button Content="Clear File Selection" Height="30" Margin="0,15,15,15" Name="button1" Width="150" Grid.Row="2" Click="button1_Click" /> <Button Content="Clear List Items" Height="30" Margin="15,15,0,15" Name="button2" Width="150" Grid.Row="2" Click="button2_Click" /> </StackPanel> |
This markup will add a ListBox control which will allow you to view local images you select using the C1FilePicker control. The markup also adds two buttons which will let you clear the content of the C1FilePicker control and the content of the ListBox.